package com.mytaobao.main.cart.func.cart;


/**
 * Created by hp on 2017/3/23.
 */

public class SelectedChangeEvent {

    float selectedPriceSum;

    int selectedCount;

    public SelectedChangeEvent(float selectedPriceSum, int SelectedCount) {
        this.selectedPriceSum = selectedPriceSum;
        this.selectedCount = SelectedCount;
    }

    public float getSelectedPriceSum() {
        return selectedPriceSum;
    }

    public void setSelectedPriceSum(float selectedPriceSum) {
        this.selectedPriceSum = selectedPriceSum;
    }

    public int getSelectedCount() {
        return selectedCount;
    }

    public void setSelectedCount(int selectedCount) {
        this.selectedCount = selectedCount;
    }

    public SelectedChangeEvent add(SelectedChangeEvent selectedChangeEvent) {
        this.selectedCount += selectedChangeEvent.getSelectedCount();
        this.selectedPriceSum += selectedChangeEvent.getSelectedPriceSum();
        return this;
    }

    @Override
    public String toString() {
        return "SelectedChangeEvent{" +
                "selectedPriceSum=" + selectedPriceSum +
                ", selectedCount=" + selectedCount +
                '}';
    }
}
